#include "../src/dbusServer.hpp"
#include <iostream>
#include <unistd.h>

int main()
{
  dbusServer server;
  server.funcGetTaskNameList=[&](){
    std::cout<<"Call funcGetTaskNameList"<<std::endl;
    return std::vector<std::string>{"test1","test2","test3","test4","test5"};
  };
  server.funcGetTaskIDList=[&](){
    std::cout<<"Call funcGetTaskIDList"<<std::endl;
    return std::vector<long>{1,2,3,4,5};
  };
  server.funcCreateTask=[&](std::string name){
    std::cout<<"Call funcCreateTask with parament "<<name<<std::endl;
    return 0;
  };
  server.funcDeleteTask=[&](long id){
    std::cout<<"Call funcDeleteTask with parament "<<id<<std::endl;
    server.ThrowError("Can't delete task");
  };
  server.funcGetRecordInf=[&](long id){
    return std::make_tuple(10,10,"1234",true,false);
  };

  server.Boot();
  while(sleep(1)==0)
    ;
}
